<template>
  <div>
      <div class="item" v-for="(item,index) of list" :key=index>
          <div class="item-tittle border-bottom">
            <span class="iconfont item-tittle-icon">&#xf525;</span>{{item.tittle}}
          <div v-if="item.children">
              <!-- 组件名用于实现递归组件 -->
              <detail-list :list="item.children"></detail-list>
          </div>
          </div>
      </div>
  </div>
</template>

<script>
export default {
  name: 'DetailList',
  props: {
    list: Array
  }
}
</script>

<style>
  .item-tittle {
   line-height: .8rem;
   font-size: .32rem;
   padding: 0 .2rem;
  }
  .item-tittle-icon {
    display: inline-block;
    margin-right: .2rem;
    color:  #00bcd4;
  }
</style>
